//package com.yndsoft.jc.ui.homepage;
//
//import android.content.Context;
//import android.support.v4.view.PagerAdapter;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.ImageView;
//
//import com.facebook.drawee.view.SimpleDraweeView;
//
//
///**
// * Created by DELL on 2016/12/10.
// */
//
//public class HomeAutoVPAdapter extends PagerAdapter {
//
//    private int[] image;
//    private Context context;
//
//    public HomeAutoVPAdapter(int[] image, Context context) {
//        this.image = image;
//        this.context = context;
//    }
//
//
//    @Override
//    public int getCount() {
//
//        return image.length;
//    }
//
//
//    @Override
//    public boolean isViewFromObject(View view, Object object) {
//
//        return view == object;
//    }
//
//    @Override
//    public Object instantiateItem(ViewGroup container, final int position) {
//
//        SimpleDraweeView simpleDraweeView = new SimpleDraweeView(context);
////        LogUtils.d(""+data.get(position).image);
////        simpleDraweeView.setImageURI(data.get(position).image);
//        simpleDraweeView.setImageResource(image[position]);
//        simpleDraweeView.setScaleType(ImageView.ScaleType.CENTER_CROP);
//        container.addView(simpleDraweeView);
//
//        simpleDraweeView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
////                if (data != null) {
////                    HomeBannerBean.DataBean dataBean = data.get(position);
////                    if (dataBean != null) {
////                        String stipType = dataBean.stipType;
////                        if (stipType != null) {
////                            String urlType = dataBean.urlType; // 跳转类型  0 资讯  1 商机 2 活动  3 投洽峰会  4 项目联营
////                            if (urlType != null) {
////                                if ("0".equals(urlType)) {
////                                    NewsDetailActivity.enterHomeDetailActivity(context, stipType);
////                                } else if ("1".equals(urlType)) {
////                                    BusinessChanceDetailActivity.enterBusinessChanceDetailActivity(context, stipType);
////                                } else if ("2".equals(urlType)) {
////                                    BusinessActiveDetailActivity.enterBusinessActiveDetailActivity(context, stipType);
////                                } else if ("3".equals(urlType)) {
////                                    BusinessCifitActivity.enterBusinessCifitActivity(context, stipType);
////                                } else if ("4".equals(urlType)) {
////                                    BusinessChanceDetail2Activity.enterBusinessChanceDetail2Activity(context, stipType);
////                                }
////                            }
////                        }
////                    }
////                }
//            }
//        });
//
//        return simpleDraweeView;
//    }
//
//    @Override
//    public void destroyItem(ViewGroup container, int position, Object object) {
////        position = position %views.size();
////        container.removeView(views.get(position));
//        container.removeView((View) object);
//    }
////    ItemClickListen itemClickListener;
////    public void setItemClickListener(ItemClickListen itemClickListener){
////        this.itemClickListener = itemClickListener;
////    }
////    public interface ItemClickListen{
////        void  click(int i);
////    }
//}
//
